/*
 * This program is free software: you can redistribute it and/or modify it under
 * the terms of the GNU General Public License as published by the Free Software
 * Foundation, either version 3 of the License, or (at your option) any later
 * version.
 * 
 * This program is distributed in the hope that it will be useful, but WITHOUT
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
 * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
 * details.
 * 
 * You should have received a copy of the GNU General Public License along with
 * this program. If not, see <http://www.gnu.org/licenses/>.
 */
package net.sf.l2j.gameserver.templates.chars;

import net.sf.l2j.gameserver.templates.StatsSet;

public class L2CharTemplate
{
	// BaseStats
	public final int baseSTR;
	public final int baseCON;
	public final int baseDEX;
	public final int baseINT;
	public final int baseWIT;
	public final int baseMEN;
	
	public final float baseHpMax;
    public final float baseCpMax;
	public final float baseMpMax;
	
	public final float baseHpReg;
	public final float baseMpReg;

	public final int basePAtk;
	public final int baseMAtk;
	public final int basePDef;
	public final int baseMDef;
	
	public final int basePAtkSpd;
	public final int baseMAtkSpd;
	
	public final float baseMReuseRate;
	public final int baseShldDef;
	public final int baseAtkRange;
	public final int baseShldRate;
	
	public final int baseCritRate;
	public final int baseMCritRate;
	
	public final int baseWalkSpd;
	public final int baseRunSpd;
	
    public final int baseMpConsumeRate;
    public final int baseHpConsumeRate;

	public final int collisionRadius;
	public final int collisionHeight;

	public L2CharTemplate(StatsSet set)
	{
		// Base stats
		baseSTR = set.getInteger("baseSTR");
		baseCON = set.getInteger("baseCON");
		baseDEX = set.getInteger("baseDEX");
		baseINT = set.getInteger("baseINT");
		baseWIT = set.getInteger("baseWIT");
		baseMEN = set.getInteger("baseMEN");
		
		baseHpMax = set.getFloat("baseHpMax");
    	baseCpMax = set.getFloat("baseCpMax");
		baseMpMax = set.getFloat("baseMpMax");
		
		baseHpReg = set.getFloat("baseHpReg", 1.5f);
		baseMpReg = set.getFloat("baseMpReg", 0.9f);
		
		basePAtk = set.getInteger("basePAtk");
		baseMAtk = set.getInteger("baseMAtk");
		basePDef = set.getInteger("basePDef");
		baseMDef = set.getInteger("baseMDef");
		
		basePAtkSpd = set.getInteger("basePAtkSpd");
		baseMAtkSpd = set.getInteger("baseMAtkSpd");
		
		baseMReuseRate = set.getFloat("baseMReuseDelay", 1.f);
		baseShldDef = set.getInteger("baseShldDef", 0);
		baseAtkRange = set.getInteger("baseAtkRange", 40);
		baseShldRate = set.getInteger("baseShldRate", 0);
		
		baseCritRate = set.getInteger("baseCritRate");
		baseMCritRate = set.getInteger("baseMCritRate", 80);
		
		baseWalkSpd = set.getInteger("baseWalkSpd", 0);
		baseRunSpd = set.getInteger("baseRunSpd", 1);
		
        baseMpConsumeRate = set.getInteger("baseMpConsumeRate", 0);
        baseHpConsumeRate = set.getInteger("baseHpConsumeRate", 0);
        
		collisionRadius = set.getInteger("collision_radius");
		collisionHeight = set.getInteger("collision_height");
	}
}